Skip to content

Merge dev into main — Geo‑Auth sessions + Wardrive queue/heartbeat + Auto‑Power + Noise Floor + RX‑Only + Public channel support + UI/Map optimizations#173

Merged
MrAlders0n merged 120 commits intomainfrom
dev
Jan 10, 2026
Merged

Merge dev into main — Geo‑Auth sessions + Wardrive queue/heartbeat + Auto‑Power + Noise Floor + RX‑Only + Public channel support + UI/Map optimizations#173
MrAlders0n merged 120 commits intomainfrom
dev

Conversation

@MrAlders0n
Copy link
Collaborator

Summary
This merge modernizes the MeshMapper Wardrive Web App with a new Geo‑Auth session model and wardrive submission pipeline, automatic device power configuration, radio stats/noise floor display, RX‑only wardriving when TX slots are full, Public channel key support, and multiple stability + UI optimizations (including flicker-free map refresh and removal of unused Leaflet assets).

Major changes

Geo‑Auth / Zones / Sessions

  • New Geo‑Auth endpoints and flows:
  • Preflight zone check on launch and periodic slot refresh:
    • Connect is disabled until zone status is known and external antenna is selected.
    • Location code and slot availability are shown in the settings panel.
    • Zone re-check while disconnected when moving ≥100m; slot refresh interval 30s.
    • Persistent “outside zone” / “outofdate” errors block other dynamic status updates until cleared.
  • Ottawa geofence removed from client ping validation (now server-enforced via /auth + /wardrive).

RX‑only mode (passive wardriving)

  • If a zone/region has no TX wardrive slots available, you can still connect in RX‑only mode and continue passive wardriving.
  • In RX‑only mode, TX Ping / TX/RX Auto are disabled, but RX Auto remains available (subject to power selected).
  • Tracks permissions from auth response: tx_allowed, rx_allowed.

Wardrive queue + batch submission + retry + heartbeat

  • Replaces direct posting with an entry-based wardrive queue submitted to /wardrive.
  • Entry format includes: type: "TX"|"RX", lat, lon, noisefloor, heard_repeats, timestamp, optional debug_data.
  • Submission behavior:
    • Periodic flush every 30s
    • TX-triggered flush after ~3s
    • Immediate flush at 50 entries
    • Single retry on network failure; re-queues entries on final failure (bounded)
  • Adds session heartbeat scheduling (~5 min before expiry), using /wardrive with heartbeat:true.

Device Auto‑Power (safety/convenience)

  • Adds content/device-models.json and docs/DEVICE_MODEL_MAPPING.md.
  • On connect, reads device model via deviceQuery(1) and auto-selects recommended power:
    • Known devices show “⚡ Auto” and hide manual selection.
    • Unknown devices require manual power selection (“⚠️ Required”) and log an error entry.
  • Includes an “Override” modal to switch from Auto to Manual selection.
  • Power is now not required pre-connect (connect gating changed to zone + antenna); power gates TX/RX controls.

Noise floor + radio stats (BLE + UI)

  • Adds BLE GetStats support:
    • CommandCodes.GetStats (0x38), ResponseCodes.Stats (0x18), StatsTypes (Core/Radio/Packets)
    • Connection.getRadioStats()
  • Displays live noise floor in the connection bar and refreshes periodically (~5s) when supported.

Channel key handling (Public channel support)

  • Adds fixed key support for Public channel (PUBLIC_CHANNEL_FIXED_KEY) while keeping SHA‑256 derived keys for hashtag channels.
  • RX allowed channels now include "Public" (not #public).
  • Uses getChannelKey() to unify key retrieval (Public fixed vs hashtag derived).

RX batching + RX parsing correctness

  • RX batch distance trigger increased 25m → 50m.
  • Adds per‑repeater 30s timeout flush (prevents batches stalling while stationary).
  • RX entries now carry noisefloor and Unix-second timestamps.
  • ADVERT parsing updated to correctly handle flags and optional lat/lon fields before extracting name.
  • Direct (no-path) RX packets are still ignored (not useful for wardriving), but no longer counted as “dropped”.

Ping/auto-mode stability fixes

  • Adds strict pingInProgress guard to prevent overlapping BLE operations.
  • Fixes auto ping pause/resume by clearing and restoring the actual ping timer.
  • Ensures scheduling clears prior timers to prevent duplicate/rapid-fire pings.
  • Captures noisefloor + timestamp at ping time for accurate TX entries.

UI/UX + map refresh optimizations

  • Double-buffered coverage iframe swap (no flicker; loads in hidden iframe then swaps).
  • Coverage embed host is now zone-aware: https://{zoneCode}.meshmapper.net/embed.php...
  • Rebrand to MeshMapper; new favicon content/wardrive-badge.png.
  • Log summary bar text updates (TX/RX/Error).
  • Removes unused Leaflet JS/CSS imports and large Leaflet CSS blocks (map is iframe embed only).
  • Adds needed Tailwind utilities (size + bg helpers) to support new layout.

Deployment / domain

  • CNAME updated to wardrive.meshmapper.net.
  • GitHub Pages workflow now pulls release tag from MeshMapper/MeshMapper_WebClient and updates version badge styling.

Testing notes (quick)

  • Launch app → zone check runs; Connect remains disabled until antenna selected + in valid zone.
  • Connect in zone with slots → “Connected” + TX/RX controls enabled (after power set).
  • Connect in zone full → “Connected (RX Only)”; TX controls disabled; RX Auto available.
  • Noise floor appears if firmware supports GetStats; updates every ~5s.
  • Wardrive queue submits TX/RX entries to /wardrive; heartbeat keeps session alive near expiry.

2) GitHub Release notes — Version Release (updated, complete)

Title: MeshMapper Wardrive WebClient — Geo‑Auth sessions, Wardrive queue/heartbeat, Auto‑Power, Noise Floor, RX‑Only, Public channel support

Highlights

  • Geo‑Auth zones + sessions: Preflight zone status (/status) + session connect/disconnect (/auth) + wardrive submissions (/wardrive).
  • RX‑only mode enabled (passive wardriving):
    • If a zone/region has no TX wardrive slots available, you can still connect in RX‑only mode and continue passive wardriving.
    • In RX‑only mode, TX Ping / TX/RX Auto are disabled, but RX Auto remains available.
  • Wardrive queue + retry + heartbeat: TX/RX observations are queued and batch-submitted; heartbeat keeps sessions alive near expiry.
  • Device Auto‑Power: Recommended radio power is automatically selected based on detected device model (with manual override).
  • Noise floor display: Live noise floor in the connection bar (when supported by firmware).
  • Public channel support: Correct fixed key handling for the MeshCore default Public channel, while hashtag channels use SHA‑256 derived keys.
  • UI/Map improvements: Flicker-free map refresh via double-buffered iframe swap; rebrand updates; removal of unused Leaflet assets.

Full changelog (complete)

  • Geo‑Auth + Zones
    • New endpoints: /status, /auth, /wardrive.
    • Zone preflight on launch + 30s slot refresh while disconnected + 100m movement recheck.
    • Persistent outside-zone / out-of-date errors block other dynamic status messages until cleared.
    • Client Ottawa geofence removed; zone enforcement now server-side via auth/wardrive.
  • Session model
    • Connect/disconnect sessions via /auth with session_id.
    • Permission flags: tx_allowed, rx_allowed enabling RX-only sessions when TX capacity is full.
  • Wardrive submission pipeline
    • Entry-only queue with wrapper {key, session_id, data:[...]} to /wardrive.
    • Flush rules: 30s periodic, TX-triggered ~3s, max 50 per batch, single retry with re-queue.
    • Heartbeat system scheduled ~5 min before expiry; retries once on failure.
    • Centralized wardrive API error handler (disconnects on session/auth failures; warns on rate limit).
  • Auto‑Power
    • Added content/device-models.json + docs/DEVICE_MODEL_MAPPING.md.
    • deviceQuery(1) model detection; build suffix stripping; exact/partial matching.
    • Known devices auto-set power (“⚡ Auto”); unknown devices force manual selection (“⚠️ Required”).
    • Override modal to switch to manual selection.
  • Noise floor / BLE stats
    • Added GetStats command and Stats response parsing in BLE library.
    • Added getRadioStats() helper; live noise floor UI + periodic refresh (~5s).
  • Channel keys
    • Adds fixed key for Public channel; hashtag channels derive keys via SHA‑256.
    • RX allowed channel list updated to include Public.
  • RX batching + parsing
    • RX batch distance: 25m → 50m.
    • Per-repeater timeout flush (~30s).
    • ADVERT name parsing updated for flags + optional lat/lon in appData.
    • Direct (no-path) packets ignored but no longer counted as “dropped”.
  • Ping/Auto fixes
    • pingInProgress guard prevents overlapping BLE operations.
    • Auto timer pause/resume corrected (clears/restores real ping timer).
    • Duplicate timer prevention for TX/RX Auto scheduling.
    • Captures noisefloor + timestamp at ping time for TX entries.
  • UI/UX + performance
    • Double-buffered map iframe swap (no flicker).
    • Zone-aware embed host: https://{zoneCode}.meshmapper.net/embed.php...
    • Rebrand to MeshMapper; new favicon content/wardrive-badge.png.
    • Log summary formatting changes.
    • Removed unused Leaflet imports + large Leaflet-specific CSS.
  • Deployment
    • CNAME updated to wardrive.meshmapper.net.
    • Pages workflow updated to read latest release tag from this repo and update version badge styling.

3) Discord announcement (updated, complete)

Merging dev → main for the MeshMapper Wardrive Web App update.

What’s new in this release:

  • Geo‑Auth zones + sessions

    • The app now checks your zone/slots via /status, authenticates via /auth, and submits data via /wardrive.
    • Connect is now gated by valid zone + external antenna selected (power is auto-configured after connect when possible).
    • The old Ottawa-only client geofence is gone — zone enforcement is handled server-side.
  • RX‑only mode enabled (passive wardriving)

    • If a zone/region has no TX wardrive slots available, you can still connect in RX‑only mode and continue passive wardriving.
    • In RX‑only mode, TX Ping / TX/RX Auto are disabled, but RX Auto remains available.
  • New wardrive queue + retry + heartbeat

    • TX/RX observations are queued and batch-submitted to the new /wardrive endpoint.
    • Includes retry behavior and a session heartbeat scheduled near expiry to keep sessions alive.
  • Device Auto‑Power (safety + convenience)

    • Detects device model (deviceQuery) and auto-selects the correct radio power (including PA safety cases).
    • Unknown devices require manual power selection; there’s an Override modal to switch to manual.
  • Noise floor + radio stats

    • Live noise floor display in the connection bar (polls periodically when supported by firmware).
  • Public channel support

    • Proper fixed-key handling for the MeshCore default Public channel.
    • Hashtag channels still use SHA‑256 derived keys.
  • RX parsing + batching improvements

    • Better ADVERT parsing (flags + optional lat/lon).
    • RX batching tuned (50m trigger + per-repeater timeout flush).
    • Direct/no-path packets are ignored (not useful for wardriving) but no longer inflate “dropped” counts.
  • UI/Map improvements

    • Flicker-free map refresh via double-buffered iframe swap.
    • Zone-aware embed host ({zoneCode}.meshmapper.net).
    • Removed unused Leaflet assets (faster/cleaner).

- Updated CONNECTION_WORKFLOW.md to include auto-power configuration based on device model detection, improving user experience by automatically selecting power levels and providing feedback on connection status.
- Revised DEVICE_MODEL_MAPPING.md to reflect changes in auto-power selection, including new device models and updated power settings.
- Expanded GEO_AUTH_DESIGN.md to detail the geographic authentication process, including device registration, zone configuration, and session management.
- Added new radio power option (2.0w) in index.html to support devices requiring higher power settings.
…, outside zone, and zone capacity changes with corresponding status messages
…n error messages, streamline disconnect logic for immediate response
…ble and clear previous disconnect reason on connect
…vents and preserve disconnect reason until a new connection is initiated
…channels, and clarify key derivation process in documentation
…ion, enhance appData handling, and improve name offset calculation
… batch and implement timeout handling for repeater buffers
Copilot AI review requested due to automatic review settings January 10, 2026 02:58
@MrAlders0n MrAlders0n merged commit 504fe0e into main Jan 10, 2026
1 check failed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR merges extensive modernization work from the dev branch into main, introducing a complete Geo-Auth session system, wardrive queue infrastructure with heartbeat, automatic device power configuration, radio statistics display, RX-only wardriving mode, Public channel support, and numerous UI/map optimizations.

Changes:

  • Geo-Auth system with zone validation, session management, and heartbeat keepalive
  • Wardrive queue refactor replacing direct API posts with entry-based batching and retry logic
  • Device Auto-Power system using device-models.json to automatically configure radio power based on hardware
  • Noise floor display via new BLE GetStats support
  • RX-only mode for passive wardriving when TX slots unavailable
  • Public channel fixed key support alongside hashtag channel SHA-256 derived keys
  • Double-buffered iframe map refresh, UI rebranding, and removal of unused Leaflet assets

Reviewed changes

Copilot reviewed 18 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
index.html Major UI restructure: connection bar layout, settings panel reorganization, power selection UI (placeholder/auto/manual), double-buffered iframes, override modal, log summary text updates
docs/STATUS_MESSAGES.md Adds ~15 new status messages for geo-auth zone checks, API error handling (session expired, invalid session, authorization failed, etc.)
docs/PING_WORKFLOW.md Documents noise floor capture step added to ping workflow
docs/GEO_AUTH_DESIGN.md Complete 1000+ line design document for geo-auth system (zones, sessions, device registration, API endpoints, implementation plan)
docs/FLOW_WARDRIVE_API_QUEUE_DIAGRAM.md Updates queue diagram for entry-only format, heartbeat system, error handling, retry logic
docs/DEVICE_MODEL_MAPPING.md New 400+ line doc for auto-power system architecture, device database, PA safety, testing
docs/CONNECTION_WORKFLOW.md Integrates auto-power step and geo-auth zone check system into connection flow
docs/DEVELOPMENT_REQUIREMENTS.md Updates debug tags (WARDRIVE QUEUE, AUTH, HEARTBEAT, WARDRIVE API)
docs/Change1.md Deleted - 1400+ line development guidelines file removed
docs/zOther/javascript/test_single_packet.mjs New test utility for RX packet decoding/validation (437 lines)
content/tailwind.css Adds missing size utilities (h-7, h-10, h-12, h-14, w-7, w-10, w-12, w-14) and bg-slate-800 class
content/style.css Removes 170+ lines of unused Leaflet-specific CSS
content/mc/constants.js Adds GetStats command (0x38), Stats response (24), and StatsTypes enum
content/mc/connection/connection.js Implements sendCommandGetStats(), onStatsResponse(), getRadioStats() for radio statistics
content/device-models.json New 277-line database of 32+ MeshCore devices with power mappings
README.md Version bump 1.7.0 → 1.8.0
.github/workflows/deploy.yml Updates version badge styling in sed command
.github/copilot-instructions.md Documents auto-power system, updates file line counts, adds channel key types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants